home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_300 / 332_01 / makefile.msc < prev    next >
Makefile  |  1990-01-05  |  13KB  |  418 lines

  1. #################################################################
  2. #                PCCURSES                #
  3. #                                #
  4. # Makefile to generate $(MODEL)curses.lib            #
  5. # For MicroSoft 'C' v.3.0, 4.0 and 5.1.                #
  6. #                                #
  7. # This makefile will generate subdirectories and call itself    #
  8. # recursively. Some entries in this makefile are only for    #
  9. # the author's personal use (I preferred to keep my own stuff    #
  10. # in the same place). Those are at the end of the makefile.    #
  11. #################################################################
  12. # 1.4:    Release:                    900114    #
  13. #################################################################
  14.  
  15. # The following are the directories where your lib and include
  16. # files will be installed. These need to be edited for your
  17. # system. Here are also the default C compiler and the standard
  18. # compilation flags. Change those if you want to. These are the
  19. # only changes that should be made to the makefile, unless you
  20. # have something special in mind... 
  21.  
  22. LIBDIR=\msc\lib
  23. INCDIR=\msc\inc
  24. MANDIR=\man
  25. CC=cl
  26. CFLAGS=-M$(MODEL) -c -Ox -W2
  27.  
  28. #################################################################
  29. # End of customizable stuff                    #
  30. #################################################################
  31.  
  32. OBJS=        attrib.obj   beep.obj     border.obj   boxes.obj     \
  33.         charadd.obj  chardel.obj  charget.obj  charins.obj   \
  34.         charpick.obj clrtobot.obj clrtoeol.obj endwin.obj    \
  35.         initscr.obj  linedel.obj  lineins.obj  longname.obj  \
  36.         move.obj     mvcursor.obj newwin.obj   options.obj   \
  37.         overlay.obj  prntscan.obj refresh.obj  scrreg.obj    \
  38.         setmode.obj  setterm.obj  stradd.obj   strget.obj    \
  39.         tabsize.obj  termmisc.obj unctrl.obj   update.obj    \
  40.         winclear.obj windel.obj   winerase.obj winmove.obj   \
  41.         winscrol.obj wintouch.obj cursesio.obj
  42.  
  43. #################################################################
  44. # 'default' is all that can (and usually is) done        #
  45. #################################################################
  46.  
  47. default:    small compact medium large
  48.  
  49. #################################################################
  50. # Install the .lib files in $(LIBDIR) directory. Header files    #
  51. # are already installed - have to be to make make work ;-)    #    
  52. #################################################################
  53.  
  54. install:    iheaders ismall icompact imedium ilarge iman
  55.  
  56. #################################################################
  57. # The following copies the header files to their proper place    #
  58. #################################################################
  59.  
  60. iheaders:    $(INCDIR)\curses.h $(INCDIR)\curspriv.h
  61.  
  62. $(INCDIR)\curses.h:    curses.h
  63.     -attrib    -r $(INCDIR)\curses.h
  64.     copy curses.h $(INCDIR)\curses.h
  65.     attrib    +r $(INCDIR)\curses.h
  66.  
  67. $(INCDIR)\curspriv.h:    curspriv.h
  68.     -attrib    -r $(INCDIR)\curspriv.h
  69.     copy curspriv.h $(INCDIR)\curspriv.h
  70.     attrib    +r $(INCDIR)\curspriv.h
  71.  
  72. #################################################################
  73. # Install the manual pages in the man directory            #
  74. #################################################################
  75.  
  76. iman:    $(MANDIR)\curses.3
  77.  
  78. $(MANDIR)\curses.3: curses.3
  79.     attrib    -r $(MANDIR)\curses.3
  80.     copy curses.3 $(MANDIR)\curses.3
  81.     attrib    +r $(MANDIR)\curses.3
  82.  
  83. #################################################################
  84. # The following will create a subdirectory for each memory    #
  85. # model, and initiate the make:ing in each one.            #
  86. #################################################################
  87. # Create work directory if non-existent, go to it, and        #
  88. # perform the job - small model                    #
  89. #################################################################
  90.  
  91. ismall:        small
  92.         -attrib -r $(LIBDIR)\scurses.lib
  93.         copy smodel.msc\scurses.lib $(LIBDIR)\scurses.lib
  94.         -attrib +r $(LIBDIR)\scurses.lib
  95.  
  96. small:        iheaders        \
  97.         smodel.msc        \
  98.         smodel.msc\farnear.inc    \
  99.         smodel.msc\smalhuge.inc
  100.     cd    smodel.msc
  101.     -make  -f ..\makefile.msc $(MAKEFLAGS) "MODEL=s" scurses.lib
  102.     cd    ..
  103.  
  104. smodel.msc:
  105.     mkdir            smodel.msc
  106.  
  107. smodel.msc\farnear.inc:        nearcall.inc
  108.     copy    nearcall.inc    smodel.msc\farnear.inc
  109.  
  110. smodel.msc\smalhuge.inc:    smaldata.inc
  111.     copy    smaldata.inc    smodel.msc\smalhuge.inc
  112.  
  113. #################################################################
  114. # Create work directory if non-existent, go to it, and        #
  115. # perform the job - compact model                #
  116. #################################################################
  117.  
  118. icompact:    compact
  119.         -attrib -r $(LIBDIR)\ccurses.lib
  120.         copy cmodel.msc\ccurses.lib $(LIBDIR)\ccurses.lib
  121.         -attrib +r $(LIBDIR)\ccurses.lib
  122.  
  123. compact:    iheaders        \
  124.         cmodel.msc        \
  125.         cmodel.msc\farnear.inc    \
  126.         cmodel.msc\smalhuge.inc
  127.     cd    cmodel.msc
  128.     -make  -f ..\makefile.msc $(MAKEFLAGS) "MODEL=c" ccurses.lib
  129.     cd    ..
  130.  
  131. cmodel.msc:
  132.     mkdir            cmodel.msc
  133.  
  134. cmodel.msc\farnear.inc:        nearcall.inc
  135.     copy    nearcall.inc    cmodel.msc\farnear.inc
  136.  
  137. cmodel.msc\smalhuge.inc:    hugedata.inc
  138.     copy    hugedata.inc    cmodel.msc\smalhuge.inc
  139.  
  140. #################################################################
  141. # Create work directory if non-existent, go to it, and        #
  142. # perform the job - medium model                #
  143. #################################################################
  144.  
  145. imedium:    medium
  146.         -attrib -r $(LIBDIR)\mcurses.lib
  147.         copy mmodel.msc\mcurses.lib $(LIBDIR)\mcurses.lib
  148.         -attrib +r $(LIBDIR)\mcurses.lib
  149.  
  150. medium:        iheaders        \
  151.         mmodel.msc        \
  152.         mmodel.msc\farnear.inc    \
  153.         mmodel.msc\smalhuge.inc
  154.     cd    mmodel.msc
  155.     -make  -f ..\makefile.msc $(MAKEFLAGS) "MODEL=m" mcurses.lib
  156.     cd    ..
  157.  
  158. mmodel.msc:
  159.     mkdir            mmodel.msc
  160.  
  161. mmodel.msc\farnear.inc:        farcall.inc
  162.     copy    farcall.inc    mmodel.msc\farnear.inc
  163.  
  164. mmodel.msc\smalhuge.inc:    smaldata.inc
  165.     copy    smaldata.inc    mmodel.msc\smalhuge.inc
  166.  
  167. #################################################################
  168. # Create work directory if non-existent, go to it, and        #
  169. # perform the job - large model                    #
  170. #################################################################
  171.  
  172. ilarge:        large
  173.         -attrib -r $(LIBDIR)\lcurses.lib
  174.         copy lmodel.msc\lcurses.lib $(LIBDIR)\lcurses.lib
  175.         -attrib +r $(LIBDIR)\lcurses.lib
  176.  
  177. large:        iheaders        \
  178.         lmodel.msc        \
  179.         lmodel.msc\farnear.inc    \
  180.         lmodel.msc\smalhuge.inc
  181.     cd    lmodel.msc
  182.     -make  -f ..\makefile.msc $(MAKEFLAGS) "MODEL=l" lcurses.lib
  183.     cd    ..
  184.  
  185. lmodel.msc:
  186.     mkdir            lmodel.msc
  187.  
  188. lmodel.msc\farnear.inc:        farcall.inc
  189.     copy    farcall.inc    lmodel.msc\farnear.inc
  190.  
  191. lmodel.msc\smalhuge.inc:    hugedata.inc
  192.     copy    hugedata.inc    lmodel.msc\smalhuge.inc
  193.  
  194. #################################################################
  195. # Put together the library in file tmp.lib, then rename it to    #
  196. # $(MODEL)curses.lib (You cannot answer 'y' to LIB prompt from    #
  197. # the .CMD file otherwise).                     #
  198. #################################################################
  199.  
  200. $(MODEL)curses.lib:    $(OBJS)
  201.     del    $(MODEL)curses.lib
  202.     lib    @..\curses.cmd
  203.     ren    tmp.lib $(MODEL)curses.lib
  204.  
  205. #################################################################
  206. # Commands and dependencies for individual modules        #
  207. #################################################################
  208.  
  209. attrib.obj:    ..\attrib.c ..\curses.h ..\curspriv.h
  210.     $(CC) $(CFLAGS) -Foattrib ..\attrib.c
  211.  
  212. beep.obj:    ..\beep.c ..\curses.h ..\curspriv.h
  213.     $(CC) $(CFLAGS) -Fobeep ..\beep.c
  214.  
  215. border.obj:    ..\border.c ..\curses.h ..\curspriv.h
  216.     $(CC) -M$(MODEL) -c -Oat -W2 -Foborder ..\border.c
  217.  
  218. boxes.obj:    ..\boxes.c ..\curses.h ..\curspriv.h
  219.     $(CC) $(CFLAGS) -Foboxes ..\boxes.c
  220.  
  221. charadd.obj:    ..\charadd.c ..\curses.h ..\curspriv.h
  222.     $(CC) $(CFLAGS) -Focharadd ..\charadd.c
  223.  
  224. chardel.obj:    ..\chardel.c ..\curses.h ..\curspriv.h
  225.     $(CC) $(CFLAGS) -Fochardel ..\chardel.c
  226.  
  227. charget.obj:    ..\charget.c ..\curses.h ..\curspriv.h
  228.     $(CC) $(CFLAGS) -Focharget ..\charget.c
  229.  
  230. charins.obj:    ..\charins.c ..\curses.h ..\curspriv.h
  231.     $(CC) $(CFLAGS) -Focharins ..\charins.c
  232.  
  233. charpick.obj:    ..\charpick.c ..\curses.h ..\curspriv.h
  234.     $(CC) $(CFLAGS) -Focharpick ..\charpick.c
  235.  
  236. clrtobot.obj:    ..\clrtobot.c ..\curses.h ..\curspriv.h
  237.     $(CC) $(CFLAGS) -Foclrtobot ..\clrtobot.c
  238.  
  239. clrtoeol.obj:    ..\clrtoeol.c ..\curses.h ..\curspriv.h
  240.     $(CC) $(CFLAGS) -Foclrtoeol ..\clrtoeol.c
  241.  
  242. endwin.obj:    ..\endwin.c ..\curses.h ..\curspriv.